package m.server.web.req;

import m.server.web.res.StatusCode;

/**
 * 请求异常
 */
public class RequestExecption extends RuntimeException {
    private final StatusCode status;
    public RequestExecption(StatusCode status,String message){
        super(message);
        this.status=status;
    }
    public RequestExecption(StatusCode status) {
        this(status,status.getMsg());
    }

    public StatusCode getStatus() {
        return status;
    }
    //是否不返回
    public boolean isNone(){
        return status==StatusCode.None;
    }
}
